package daam.main;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class HowToPlay extends Activity {

	private HowToPlayListener listener;
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		listener = new HowToPlayListener(this);
		
		setContentView(R.layout.howtoplay);
		
		Button toMove = (Button)findViewById(R.id.toMove);
		toMove.setOnClickListener((OnClickListener) listener);

	}
	
	public void setLayout(int layout){
		
		setContentView(layout);
		
		if(layout == R.layout.howtoplay){

			Button toMove = (Button)findViewById(R.id.toMove);
			toMove.setOnClickListener((OnClickListener) listener);
			
		}
		
		if(layout == R.layout.howtoplay_move){
						
			Button toPontos = (Button)findViewById(R.id.toPontos);
			toPontos.setOnClickListener((OnClickListener) listener);

			Button toMain = (Button)findViewById(R.id.toMain);
			toMain.setOnClickListener((OnClickListener) listener);
			
		}
		
		if(layout == R.layout.howtoplay_pontos){

			Button toMove = (Button)findViewById(R.id.toMove);
			toMove.setOnClickListener((OnClickListener) listener);
			
			Button toVidas = (Button)findViewById(R.id.toVida);
			toVidas.setOnClickListener((OnClickListener) listener);
			
		}
		
		if(layout == R.layout.howtoplay_vidas){

			Button toPontos = (Button)findViewById(R.id.toPontos);
			toPontos.setOnClickListener((OnClickListener) listener);
			
			Button toBomba = (Button)findViewById(R.id.toBomba);
			toBomba.setOnClickListener((OnClickListener) listener);
		}
		
		if(layout == R.layout.howtoplay_bomba){

			Button toVida = (Button)findViewById(R.id.toVida);
			toVida.setOnClickListener((OnClickListener) listener);


			
		}	
	}
}
